package club.orqlog.hash;

public class GeneralHash {

    public static void main(String[] args) {
        String[] clientIps = new String[]{"113.225.12.23", "24.192.12.33", "132.223.12.88"};
        int serverCounts = 5;

        for (int i = 0; i < clientIps.length; i++) {
            String ip = clientIps[i];
            int tServer = Math.abs(ip.hashCode() % 5);
            System.out.println("The target server: " + tServer + " Client: " + ip);
        }
    }
}
